<template>
  <ImgModule :tab="tab" :show-legend="true" />
</template>

<script setup lang="ts" name="girdImage">
import { ref, onMounted } from "vue";
import ImgModule from "@/components/ImgModule/index.vue";
import { GetIMAGETab } from "@/api/modules/upload";
import { useRoute } from "vue-router";

const route = useRoute();
const tab = ref<any>([]);

onMounted(async () => {
  const res: any = await GetIMAGETab({ folder: "网格看板\\网格市场占比感知地图" });
  tab.value = res.data
    .filter((item: any) => item.label.includes(route.query.name as string))
    .map((item: any, index: number) => ({
      ...item,
      name: index + 1
    }));
});
</script>
